package com.learn.springcloud.hystrixexplaininattributeconsumer.command.service.impl;

import com.learn.springcloud.hystrixexplaininattributeconsumer.command.service.CommandExecutionIsolationStrategyAnnotation;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;

/**
 * 注解方式配置属性
 * @Time : 2018/8/7 11:43
 * @Version : 1.0
 */
public class CommandExecutionIsolationStrategyAnnotationImpl implements CommandExecutionIsolationStrategyAnnotation {

    @Override
    @HystrixCommand(commandProperties = {
            @HystrixProperty(name="xecution.isolation.thread.timeoutInMilliseconds", value="500")
    })
    public String sayHello(String name) {
        return null;
    }

}
